package com.mipo.service;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.mipo.dao.imp.MessageReceiveDAO;
import com.mipo.dao.imp.MessageReceiveDAOImp;
import com.mipo.vo.Employee;
import com.mipo.vo.MessageReceive;

public class InTakeService extends HttpServlet {

	public void service(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		HttpSession session = request.getSession();
		Employee emp = (Employee) session.getAttribute("tzx");
			try {
				MessageReceiveDAO dao = new MessageReceiveDAOImp();
				List<MessageReceive> list = dao.queryMessage(emp);
				request.setAttribute("mrList", list);
				request.getRequestDispatcher("mess/inTake.jsp").forward(
						request, response);
			} catch (Exception e) {
				e.printStackTrace();
			}
	}
}
